import { ThemeEnum } from "@/const";
import { theme } from "@/views/dataview/setting/designSetting";
import { defineStore } from "pinia";
import { computed, reactive } from "vue";

const { darkTheme, appTheme, appThemeDetail } = theme

export const useDesignStore = defineStore("useDesignStore",()=>{
    const degisnState = reactive({
        // 是否暗黑
        darkTheme,
        // 主题名称
        themeName: (darkTheme && ThemeEnum.DARK) || ThemeEnum.LIGHT,
        // 颜色色号
        appTheme,
        appThemeDetail,
    })

    const getAppTheme = computed(()=>{
        return degisnState.appTheme
    })

    return {
        degisnState,
        getAppTheme
    }
})